server {

    listen 31000;
    server_name www.youyujf.com;

    default_type 'text/html';
    charset utf-8;

    lua_code_cache on;

    location /check {
        default_type 'text/plain';
        content_by_lua_block {
            ngx.say('proxy_pass:http://47.103.206.194:31000')
        }  
    }

    location / {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Headers X-Requested-With;
        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;

        proxy_pass http://47.103.206.194:31000/;
    }
    
}

server {

    listen 50001;
    server_name www.youyujf.com;

    default_type 'text/html';
    charset utf-8;

    lua_code_cache on;

    location /check {
        default_type 'text/plain';
        content_by_lua_block {
            ngx.say('proxy_pass http://49.235.116.35:50001/')
        }  
    }

    location / {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Headers X-Requested-With;
        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;

        proxy_pass http://49.235.116.35:50001/;
    }


}


server {

    listen 50002;
    server_name www.youyujf.com;

    default_type 'text/html';
    charset utf-8;

    lua_code_cache on;

    location /check {
        default_type 'text/plain';
        content_by_lua_block {
            ngx.say(' proxy_pass http://49.235.116.35:50002/')
        }  
    }

    location / {
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Headers X-Requested-With;
        add_header Access-Control-Allow-Methods GET,POST,OPTIONS;

        proxy_pass http://49.235.116.35:50002/;
    }

}